//
//  MapArea.m
//  ZeroWorld
//
//  Created by 马进 on 2018/2/9.
//  Copyright © 2018年 马进. All rights reserved.
//

#import "MapArea.h"

@implementation MapArea
- (instancetype)initWithAreaId:(NSUInteger)areaid name:(NSString *)name blocks:(NSMutableArray *)mapBlocks {
    self = [super init];
    if (self) {
        self.areaid = areaid;
        self.name = name;
        self.mapBlocks = mapBlocks;
    }
    return self;
}

- (MapBlock *)lookMapBlock:(NSUInteger)mapid {
    if (self.mapBlocks) {
        if (mapid < self.mapBlocks.count) {
            return [self.mapBlocks objectAtIndex:mapid];
        }
    }
    return nil;
}

@end
